home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk2.zip / LST11-6.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  455b  |  24 lines

  1. ;
  2. ; *** Listing 11-6 ***
  3. ;
  4. ; Sets the high bit of every element in a byte
  5. ; array by ORing directly to memory.
  6. ;
  7.     jmp    Skip
  8. ;
  9. ;
  10. ARRAY_LENGTH    equ    1000
  11. ByteArray    db    ARRAY_LENGTH dup (?)
  12. ;
  13. Skip:
  14.     call    ZTimerOn
  15.     mov    si,offset ByteArray    ;point to the array
  16.     mov    cx,ARRAY_LENGTH
  17.     mov    al,80h            ;bit pattern to OR
  18. SetHighBitLoop:
  19.     or    [si],al            ;set the high bit
  20.     inc    si            ;point to the next
  21.                     ; byte
  22.     loop    SetHighBitLoop
  23.     call    ZTimerOff
  24.